package cn.edu.qfnu.common.paginate;

import java.io.Serializable;

/**
 * 分页信息类
 */
public class Pagination implements Serializable {
    private static final long serialVersionUID = 1L;
    //当前页数
    private int pageNo;
    //每页显示数量
    private int pageSize;
    //数据总数
    private long total;

    public Pagination(int pageNo, int pageSize) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.total = 0;
    }

    public int getPageNo() {
            return pageNo;
        }

    public int getPageSize() {
            return pageSize;
        }

    public long getTotal() {
            return total;
        }

    public int getFirst() {
            return (pageNo - 1) * pageSize;
        }

    public void setTotal(long total) {
            this.total = total;
        }

}
